/*
 * Boat.h
 *
 *  Created on: Jun 19, 2009
 *      Author: computer
 */

#ifndef BOAT_H_
#define BOAT_H_
#include <string>
using std::string;
#include "Point.h"
#include "Arena.h"
#include "InvalidBoatName.h"
#include "InvalidBoatConfiguration.h"

class Boat {
public:
	Boat(const string&, const Point<int>&);
	virtual ~Boat();
	
	static Boat* createBoat(const string&, const string&, const Point<int>&, int) throw (InvalidBoatName, InvalidBoatConfiguration);
	
	virtual bool fireToBoat(const Point<int>&, Arena*) = 0;
	virtual bool isDestroyed() = 0;
	virtual void write(Arena*) throw (OutOfBound, OverlapBoat, TooNearBoat) = 0;

	void setName(const string&);
	string getName() const ;

	void setOrigin(const Point<int>&);
	Point<int> getOrigin() const;

private:
	string name;
	Point<int> origin;
};

#endif /* BOAT_H_ */
